package com.yuanian.ecsplus.test;

import com.yuanian.ecsplus.bean.entity.LambdaModel;

import java.util.ArrayList;
import java.util.List;

public class Demo1 {
    public static void main(String[] args) {

        SourcingTemplate sourcingTemplate = new SourcingTemplate();
        SourcingTemplate sourcingTemplate1 = new SourcingTemplate();
        LambdaModel<SourcingTemplate> lambdaQModel = new LambdaModel(SourcingTemplate.class);

       // System.out.println(lambdaQModel.andStart().andStart().like(SourcingTemplate::getName, "zzzz").andEnd().orStart().eq(SourcingTemplate::getObjectId, "zzzz").eq(SourcingTemplate::getObjectId, "zzzz").orEnd().andEnd().getSql());
        //System.out.println(lambdaQModel.orStart().like(SourcingTemplate::getName, "zzzz").eq(SourcingTemplate::getObjectId, "zzzz").andStart().lt(SourcingTemplate::getAppId, "xxx").le(SourcingTemplate::getAppId, "xxx").andEnd().orEnd().getSql());

     /*   System.out.println(lambdaQModel
                .andStart()
                    .andStart()
                        .eq(SourcingTemplate::getObjectId, "1")
                    .andEnd()

                    .orStart()
                    .eq(SourcingTemplate::getObjectId, "2")
                        .andStart()
                            .eq(SourcingTemplate::getObjectId, "3")
                            .eq(SourcingTemplate::getObjectId, "4")
                        .andEnd()
                    .eq(SourcingTemplate::getObjectId, "5")
                    .orEnd()

                    .eq(SourcingTemplate::getObjectId, "6")

                .andEnd().getSql());*/
        /*   sourcingTemplate.setObjectId("ooooo");

        SourcingAward sourcingAward =   new SourcingAward();
        sourcingAward.setType("gggg");
        sourcingAward.setSex("male");
        sourcingAward.setCategory("zzzz");
        sourcingAward.setBoDataId("pppp");

        SourcingQuoate sourcingQuoate = new SourcingQuoate();
        sourcingQuoate.setAddress("address");

        SourcingQuoate sourcingQuoate1 = new SourcingQuoate();
        sourcingQuoate1.setAddress("addressxxx");

        //sourcingTemplate.setSourcingAwardE(sourcingAward);
        //sourcingAward.setSourcingQuoate(new SourcingQuoate());

        List<SourcingQuoate> sourcingQuoates = new ArrayList<>();
        sourcingQuoates.add(sourcingQuoate);
        sourcingQuoates.add(sourcingQuoate1);
        //sourcingTemplate.setSourcingQuoate(sourcingQuoates);

        //sourcingTemplate.insert();
        sourcingTemplate.issue();
        sourcingTemplate.insert();*/
        //LambdaQModel<SourcingTemplate> lambdaQModel = new LambdaQModel(SourcingTemplate.class);
        //List<SourcingTemplate> list = lambdaQModel.and().eq(SourcingTemplate::getType, "xxxx").like(SourcingTemplate::getName, "zzzz").findList();
    }
}
